#
#    Copyright (C) 2016 Francisco Javier Parra <franparpe@openmailbox.org>
#    Copyright (C) 2016 Enrique Ernesto Zayas <enrique.zayas@upc.edu>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

from PyQt5.QtWidgets import QDialog
from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.QtWidgets import QHBoxLayout
from PyQt5.QtWidgets import QLabel
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import Qt
from PyQt5.QtCore import QSize
# from PyQt5.QtCore import SIGNAL
from PyQt5 import QtCore


try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s


class AboutQtCAM(QDialog):
    def __init__(self, parent):
        QDialog.__init__(self, parent, Qt.Dialog)
        self.setWindowTitle(self.tr("About QtCAM"))
        self.setMaximumSize(QSize(0, 0))

        vbox = QVBoxLayout(self)

        # Adding a label for the title
        labelTitle = QLabel("<h1>QtCAM</h1>")

        # Adding a label for the authors
        authors = "Francisco Javier Parra Pérez <franparpe@openmailbox.org> \n Enrique Ernesto Zayas Figueras <enrique.zayas@upc.edu>"
        labelAuthors = QLabel(_fromUtf8(authors))

        vbox.addWidget(labelTitle)
        vbox.addWidget(labelAuthors)
